package com.ykt.validator;

import com.jfinal.core.Controller;

/**
 * @author long.hua
 * @version 1.0.0
 * @since 2016-02-21 22:29
 */
public class ClientValidator extends BaseValidator {


    @Override
    protected void validate(Controller c) {
        validateRequired("versionCode", "versionCodeMsg", "版本号不能为空！");
        validateInteger("versionCode", 1, Integer.MAX_VALUE, "versionCodeMsg", "版本号取值范围错误！");
    }

    @Override
    protected void handleError(Controller c) {
        c.renderJson(super.toJsonText(c));
    }

}
